package com.amway.qy.resource.result.tag;

import java.util.List;

import com.amway.qy.resource.result.BaseResult;

public class QyEnrichTagResult extends BaseResult {
	
	protected static final String SuccessDelete = "deleted";
	protected static final String SuccessAdd = "ok";
	
	
	private List<String> invalidlist;
	private List<Integer> invalidparty;
	
	/*
	 * 由于对标签成员的添加和删除，会产生部分成功，部分失败的情况或者是全部失败的情况。
	 * 而对于部分成功，微信的错误码永远是返回0。所以重写该方法，将判断此次请求成功与否的逻辑，移至 errmsg 处。
	 * 
	 * (non-Javadoc)
	 * @see com.amway.qy.resource.result.BaseResult#isSuccess()
	 */
	@Override
	public boolean isSuccess() {
		return (SuccessDelete.equals(errmsg) || SuccessAdd.equals(errmsg));
	}
	public List<String> getInvalidlist() {
		return invalidlist;
	}
	public void setInvalidlist(List<String> invalidlist) {
		this.invalidlist = invalidlist;
	}
	public List<Integer> getInvalidparty() {
		return invalidparty;
	}
	public void setInvalidparty(List<Integer> invalidparty) {
		this.invalidparty = invalidparty;
	}
	@Override
	public String toString() {
		return "QyEnrichTagResult [invalidlist=" + invalidlist + ", invalidparty=" + invalidparty + ", errcode="
				+ errcode + ", errmsg=" + errmsg + "]";
	}
	
	
	
}
